package com.example.demo.service;

import com.example.demo.domain.UserComment;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@CacheConfig(cacheNames = "userComments")
public interface UserCommentService {
    /**
     *
     * @param mId
     * @return
     */

    List<UserComment> getCommentByMuscleId(Integer mId);

    /**
     *
     * @param userId
     * @param muscleId
     * @param comment
     * @return
     */
    @Transactional
    Integer makeComment(Integer userId,Integer muscleId,String comment);
}
